home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 223_01 / ctell.c < prev    next >
Text File  |  1980-01-01  |  512b  |  28 lines

  1.  
  2. /*
  3. ** ctell.c    by    F. A. Scacchitti    9/11/84
  4. */
  5.  
  6. #define NOCCARGC
  7.  
  8. #include <stdio.h>
  9.  
  10. static char *fcb;
  11. static int bsec, osec, t;
  12.  
  13. ctell(fd) int fd; {
  14.  
  15. fcb = fd;
  16.  
  17. bsec = (*(fd + 36) - fd - 42) / 128 ;
  18. t = fcb[32];
  19.  
  20. if((osec = t % 8) == 0 && t != 0)
  21.     osec = 8;
  22. if(t < 0) t = 128;
  23.  
  24. return((fcb[12] * 128) + t - osec + bsec);
  25.  
  26. }
  27.  
  28.